<?php


namespace App\Entity;
use DateTime;
use Doctrine\ORM\Mapping AS ORM;

/**
 * Class FilesObject
 * @package App\Entity
 * @ORM\Entity
 * @ORM\Table(name="entertainment")
 * @ORM\HasLifecycleCallbacks()
 */
class Entertainment
{
    /**
     * @var int
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     * @ORM\Column(type="integer")
     */
    private $id;
    /**
     * @var DateTime
     * @ORM\Column(name="create_date", type="datetime",nullable=false, options={"comment"="创建时间"})
     */
    private $createDate;
    /**
     * @var string video|电影  music|音乐 game|游戏
     * @ORM\Column(name="type", type="string", nullable=true)
     */
    private $type;
    /**
     * @var string
     * @ORM\Column(name="url", type="string", nullable=true)
     */
    private $url;
    /**
     * @var FileObject|null
     * @ORM\OneToOne(targetEntity="FileObject")
     * @ORM\JoinColumn(name="images_id", referencedColumnName="id")
     */
    private $images;

    /**
     * @return int
     */
    public function getId(): int
    {
        return $this->id;
    }

    /**
     * @return DateTime
     */
    public function getCreateDate(): DateTime
    {
        return $this->createDate;
    }

    /**
     * @param DateTime $createDate
     */
    public function setCreateDate(DateTime $createDate): void
    {
        $this->createDate = $createDate;
    }

    /**
     * @return string
     */
    public function getType(): string
    {
        return $this->type;
    }

    /**
     * @param string $type
     */
    public function setType(string $type): void
    {
        $this->type = $type;
    }

    /**
     * @return string
     */
    public function getUrl(): string
    {
        return $this->url;
    }

    /**
     * @param string $url
     */
    public function setUrl(string $url): void
    {
        $this->url = $url;
    }

    /**
     * @return FileObject|null
     */
    public function getImages(): ?FileObject
    {
        return $this->images;
    }

    /**
     * @param FileObject|null $images
     */
    public function setImages(?FileObject $images): void
    {
        $this->images = $images;
    }



}
